<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ref</title>
</head>

<body>
    <script type="module">
        import { reactive, effect, ref } from './reactivity/index.js'
        const price = ref(100)
        const count = ref(5)

        let totalPrice = 0
        effect(() => {
            totalPrice = price.value * count.value
        })

        console.log(totalPrice)

        price.value = 200

        console.log(totalPrice)

        count.value = 10

        console.log(totalPrice)
    </script>
</body>

</html>